<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>jquery操作dom</title>
    <script src="./node_modules/jquery/dist/jquery.js"></script>
    <script src="./js/ctl_dom.js"></script>
    <style>
        body {
            height: 800px;
        }

        .wrap {
            position: absolute;
            width: 888px;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
            text-align: center;

        }

        .use-absolute {
            position: relative;
            width: 500px;
            height: 500px;
            border: 1px solid #000;
            margin: 0 auto;
            top: 50%;
        }

        .use-absolute div {
            position: absolute;
            overflow: hidden;
            width: 180px;
            height: 300px;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            margin: auto;
            background: #f60;
            text-align: center;
            -webkit-user-select: none;
        }
    </style>
</head>
<body>
<div class="use-absolute">
    <div>
        <p>李白乘舟将欲行</p>
        <p>忽闻岸上踏歌声</p>
        <p>桃花潭水深千尺</p>
        <p>不及汪伦送我情</p>
    </div>
</div>
<div class="wrap">
    <h1>赠汪伦</h1>
    <div>
        <p>李白乘舟将欲行</p>
        <p>忽闻岸上踏歌声</p>
        <p>桃花潭水深千尺</p>
        <p>不及汪伦送我情</p>
    </div>
</div>

</body>
</html>